<template>
  <!-- 轮播图 -->
  <el-carousel >
    <el-carousel-item v-for="(item, index) in carouselList" :key="index">
      <img :src="item.imageUrl" alt="" />
    </el-carousel-item>
  </el-carousel>
</template>

<script>

import { ReqAllRotationChart } from "../request/index";

export default {
  data() {
    return {
      carouselList:[],
    };
  },
  methods: {
    // 获取轮播图列表
    async getCarouselList() {
      let RotationList = await ReqAllRotationChart();
      this.carouselList = RotationList.page.list;
      // console.log(this.carouselList)
    }
  },
  async created() {
    await this.getCarouselList()
  }
};
</script>

<style scoped>
.el-carousel{
  height: 20vw;
}
img {
  width: 100vw;
  z-index: 99;
}
.el-carousel-item {
  height: 40vw;
}
@media screen and (max-width: 768px) {
  img {
    padding-left: 0px !important;
  }
  .el-carousel{
  height: 20vw;
}
}
</style>
